<template>
	<view>
		<view class="card" :style="{background: 'url('+backgroundImageURL+')'}">
			<view class="top u-flex">
				<view class="left u-flex">
					<view class="line">
					</view>
					<view class="nameWp">
						<view class="name">
							{{userInfo.name}}
						</view>
						<view class="title">
							{{userInfo.position}}
						</view>
					</view>
				</view>
				<view class="right">
					<img src="https://file.casugn.com/storecompcard/temp/logo_1654770126471.png" alt="">
				</view>
			</view>
			<view class="middle">
				<view class="left">
				</view>
				<view class="triangle">
				</view>
				<view class="right">
				</view>
			</view>
			<view class="bottom">
				<view class="left">
					<view class="company">
						{{userInfo.company}}
					</view>
					<view class="tel">
					TEL:{{userInfo.mobile}}
					</view>
					<view class="tel">
					EMAIL:{{userInfo.mail}}
					</view>
					<view class="tel">
					ADD:{{userInfo.address}}
					</view>
				</view>
				<view class="right">
					<img src="https://file.casugn.com/storecompcard/temp/QR Code_1654770145778.png" alt="">
				</view>
		
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		name:"cardStyle",
		data() {
			return {
			backgroundImageURL:'https://file.casugn.com/storecompcard/temp/cardbg_1654770085984.png',
			};
		},
		props:{
			userInfo:{
				type:Object,
				default:()=>{},
				required: true
			}
		}
	}
</script>
<style lang="scss">

		.card {
			margin: 30upx;
			background:  no-repeat fixed top;
			border-radius: 20upx;

			.top {
				height: 200upx;
				display: flex;
				justify-content: space-between;
				align-items: flex-start;

				.left {
					margin-top: 40upx;
					margin-left: 40upx;
					display: flex;

					.line {
						width: 6upx;
						height: 90upx;
						background-color: #1D2B56;
						margin-top: 15upx;
					}

					.nameWp {
						margin-left: 20upx;
						font-size: 33upx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #000000;
						line-height: 64upx;
					}

					.title {
						text-align: right;
						font-size: 20upx;
						font-family: PingFang SC;
						font-weight: 300;
						color: #000000;
						line-height: 41upx;
					}
				}

				.right {
					align-self: flex-end;
					margin-right: 60upx;
					width: 178upx;
					height: 68upx;

					img {
						width: 100%;
						height: 100%;
					}
				}
			}

			.middle {
				display: flex;
				height: 32upx;
				padding-bottom: 20upx;

				.left {
					width: 200upx;
					height: 32upx;
					background-color: #1D2B56;
				}

				.triangle {
					height: 32upx;
					width: 32upx;
					background: linear-gradient(45deg, #1D2B56, #1D2B56 50%, transparent 50%, transparent 100%);
				}

				.right {
					flex: 1;
					margin-left: -2upx;
					align-self: flex-end;
					height: 2upx;
					background-color: #1D2B56;
				}
			}

			.bottom {
				display: flex;
				justify-content: space-between;
				padding-bottom: 30upx;

				.left {
					margin-left: 40upx;

					.company {
						overflow-wrap: break-word;
						color: rgba(0, 0, 0, 1);
						text-align: left;
						white-space: nowrap;
						line-height: 24rpx;
						display: block;
						font-size: 24upx;
						font-family: PingFang SC;
						font-weight: 800;
						line-height: 41upx;
					}

					.tel {
						overflow-wrap: break-word;
						color: rgba(0, 0, 0, 1);
						font-size: 20upx;
						text-align: left;
						white-space: nowrap;
						line-height: 30upx;
						display: block;
					}
				}

				.right {
					width: 88rpx;
					height: 88rpx;
					margin-right: 60upx;

					// margin-left: 10upx;
					img {
						width: 100%;
						height: 100%;
					}
				}
			}
		}

	
</style>